package com.baibei.model;

/**
 * 用户信息
 */
public class UserInfo {

    /**
     * 普通用户
     */
    public static final int USER_TYPE_PERSONAL = 0;
    /**
     * 企业用户
     */
    public static final int USER_TYPE_ENTERPRISE = 10;

    private int userId;
    private String userName;
    private String mobile;
    private String userPic;
    private int sex;
    private String wid;

    // 是否启用：1-账户正常;0-账户无效;101-禁止充值;102-禁止提现;103-禁止交易;104-禁止充值、提现;105-禁止交易、充值;106-禁止交易、提现;107-禁止充值、提现、交易
    private int flag;
    private int userType;
    private int memberUnitsId;
    private String unitNo;
    private String memberChannel;

    /**
     * 是否实名制
     * 1-是，0-否
     */
    private int isRealName;

    /**
     * 是否设置资金密码
     * 1-是，0-否
     */
    private int hasFundPassword;


    // 邀请码
//    @SerializedName("invatationCode")
    private String invitationCode;

    public int getIsRealName() {
        return isRealName;
    }

    public void setIsRealName(int isRealName) {
        this.isRealName = isRealName;
    }

    public int getHasFundPassword() {
        return hasFundPassword;
    }

    public void setHasFundPassword(int hasFundPassword) {
        this.hasFundPassword = hasFundPassword;
    }

    /**
     * 是否设置了资金密码
     *
     * @return return
     */
    public boolean hasSetFundPwd() {
        return hasFundPassword == 1;
    }

    /**
     * 是否通过实名认证
     *
     * @return return
     */
    public boolean isPassRealNameVerify() {
        return isRealName == 1;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getUserPic() {
        return userPic;
    }

    public void setUserPic(String userPic) {
        this.userPic = userPic;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public String getWid() {
        return wid;
    }

    public void setWid(String wid) {
        this.wid = wid;
    }

    public int getFlag() {
        return flag;
    }

    public void setFlag(int flag) {
        this.flag = flag;
    }

    public int getUserType() {
        return userType;
    }

    public void setUserType(int userType) {
        this.userType = userType;
    }

    public int getMemberUnitsId() {
        return memberUnitsId;
    }

    public void setMemberUnitsId(int memberUnitsId) {
        this.memberUnitsId = memberUnitsId;
    }

    public String getUnitNo() {
        return unitNo;
    }

    public void setUnitNo(String unitNo) {
        this.unitNo = unitNo;
    }

    public String getMemberChannel() {
        return memberChannel;
    }

    public void setMemberChannel(String memberChannel) {
        this.memberChannel = memberChannel;
    }

    @Override
    public String toString() {
        return "UserInfo{" +
                "userId=" + userId +
                ", userName='" + userName + '\'' +
                ", mobile='" + mobile + '\'' +
                ", userPic='" + userPic + '\'' +
                ", sex=" + sex +
                ", wid='" + wid + '\'' +
                ", flag=" + flag +
                ", userType=" + userType +
                ", memberUnitsId=" + memberUnitsId +
                ", unitNo='" + unitNo + '\'' +
                ", memberChannel='" + memberChannel + '\'' +
                ", isRealName=" + isRealName +
                ", hasFundPassword=" + hasFundPassword +
                '}';
    }

    public String getInvitationCode() {
        return invitationCode;
    }

    public void setInvitationCode(String invitationCode) {
        this.invitationCode = invitationCode;
    }
}
